package com.xxd.gulimail.product.feign;

import com.xxd.common.to.SkuReductionTo;
import com.xxd.common.to.SpuBoundsTo;
import com.xxd.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("gulimail-coupon")
public interface CouponFeignService {

    /*
    1.@RequestBody 将boundsTo转成json
    2.将json数据作为请求体发送给gulimail-coupon/coupon/spubounds/save目标接口
    3.@RequestBody SpuBoundsEntity spuBounds将请求的json转化为SpuBoundsEntity
    */
    @PostMapping("/coupon/spubounds/save")
    R saveSpuBounds(@RequestBody SpuBoundsTo boundsTo);

    @PostMapping("coupon/skufullreduction/saveInfo")
    R saveSkuReduction(@RequestBody SkuReductionTo reductionTo);
}
